import Vue from "vue";
import VueRouter from "vue-router";
Vue.use(VueRouter);
import login from "@/views/login";
import layout from "@/views/layout";
import my from "@/views/my";
import msg from "@/views/msg";
import min from "@/views/min";
import findroom from "@/views/findroom";
import city from "@/views/city";
import xq from "@/views/xq";
import shoucang from "@/views/shoucang";
import chuzu from "@/views/chuzu";
import quchuzu from "@/views/quchuzu";
import map from "@/views/map";
const routes = [
  { path: "/", redirect: "/layout/min" },
  {
    path: "/layout",
    component: layout,
    children: [
      { path: "min", component: min },
      { path: "findroom", component: findroom },
      { path: "msg", component: msg },
      { path: "my", component: my },
    ],
  },
  { path: "/login", component: login },
  { path: "/city", component: city },
  { path: "/xq", component: xq },
  { path: "/shoucang", component: shoucang },
  { path: "/chuzu", component: chuzu },
  { path: "/quchuzu", component: quchuzu },
  { path: "/map", component: map },
];

const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});

export default router;
